home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Games / Solitaire / Sources / FortyThieves / FTAlertPanel.m < prev    next >
Encoding:
Text File  |  1994-04-17  |  1.2 KB  |  70 lines

  1. /* AlertPanel.h
  2.  * Written By:  Thomas Burkholder
  3.  *
  4.  * You may freely copy, distribute, and reuse the code in this example.
  5.  * NeXT disclaims any warranty of any kind, expressed or  implied, as to its
  6.  * fitness for any particular use.
  7.  */
  8.  
  9. #import "FTAlertPanel.h"
  10.  
  11. @implementation FTAlertPanel
  12.  
  13. - buttonPressed:sender
  14. {
  15.     lastResult = [sender tag];
  16.     [NXApp stopModal];
  17.     return self;
  18. }
  19.  
  20. - (int)lastResult
  21. {
  22.     return lastResult;
  23. }
  24.  
  25. - run:sender
  26. {
  27.     [self makeKeyAndOrderFront:sender];
  28.     [NXApp runModalFor:self];
  29.     [self orderOut:self];
  30.     return self;
  31. }
  32.  
  33. - alert { return alert; }
  34. - first { return first; }
  35. - iconButton { return iconButton; }
  36. - message { return message; }
  37. - second { return second; }
  38. - third { return third; }
  39.  
  40. - write:(NXTypedStream *)stream
  41. {
  42. printf("in write\n");
  43.     [super write:stream];
  44.     NXWriteTypes(stream,"@@@@@@i",
  45.             alert,first,iconButton,message,second,third,lastResult);
  46.     return self;
  47. }
  48.  
  49. - read:(NXTypedStream *)stream
  50. {
  51. printf("in read\n");
  52.     [super read:stream];
  53.     NXReadTypes(stream,"@@@@@@i",
  54.             alert,first,iconButton,message,second,third,lastResult);
  55.     return self;
  56. }
  57.  
  58. - free
  59. {
  60.     [first free];
  61.     [second free];
  62.     [third free];
  63.     [iconButton free];
  64.     [message free];
  65.     [alert free];
  66.     return [super free];
  67. }
  68.  
  69. @end
  70.